﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

using System.IO;

namespace DBStoreWorkerRole.Contracts
{
    class TempDataContract
    {
    }
    [DataContract(Namespace = "http://uclwebservicetest.cloudapp.net/Contracts/DataLog/Temp"), Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class TempDataLog
    {
        [DataMember, Newtonsoft.Json.JsonProperty,]
        public int deviceId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int sensorId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String firstTime { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String lastTime { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public List<Data> data { get; set; }
    }
    [DataContract(Namespace = "http://uclwebservicetest.cloudapp.net/Contracts/DataLog/Temp/Data"), Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class Data
    {
        [DataMember, Newtonsoft.Json.JsonProperty,]
        public double temperature { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public double humidity { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String time { get; set; }
    }
}
